<template>
	<view class="home">
		<view class="h_header">
			<view class="hh_cicle">
				<image src="/static/images/home/logo.png" class="hc_imgs"></image>
			</view>
			<view class="login_box">
				<text v-if="!loginFlag" class="hc_login l_box_txt1">Hi~ 智初小交欢迎您!</text>
				<view class="l_b_box">
					<text class="hc_login">{{
            loginFlag
              ? String(mobileNo).replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")
              : "未登录，请登录"
          }}</text>
					<text id="LOGIN_BTN" class="l_b_login" v-if="!loginFlag" @click="jumpLogin">登录</text>
				</view>
				<text class="l_login_txt" v-if="loginFlag">欢迎使用智初小交~</text>
			</view>
		</view>
		<view class="h_car">
			<view class="hcc_item" @click="" v-for="(item, ind) in QRList" :key="ind" @click="jumpRepastTo(item)">
				<image class="home_hc_img" :src="item.icon"></image>
				<text class="hc_txt h_h_title">{{ item.menuTitle }}</text>
			</view>
		</view>
		<view class="h_notice">
			<view class="h_n_box">
				<image class="n_img" src="/static/images/home/ba.png"></image>
				<view class="txt_box">
					<view v-if="newList.length > 0">
						<swiper style="height: 34rpx;" vertical="true" autoplay="false" duration="500" interval="4000">
							<swiper-item v-for="(item, index) in newList" :key="index">
								<view class="s_txt">{{ item.msgContent }}</view>
							</swiper-item>
						</swiper>
					</view>
					<view v-else>
						<view class="s_txt">暂无公告通知</view>
					</view>
				</view>
			</view>
		</view>
		<view class="h_content" :style="{ height: height }">
			<view class="hc_item1">
				<text class="hc_txt1">便捷服务</text>
				<view class="hc_list1">
					<view class="hcc_item1" v-for="(item, index) in homeList" :key="index" @click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon"
							:style="item.menuTitle == '人脸采集' ? 'width: 70rpx;height: 70rpx;margin-bottom:0;margin-top: 3px;': ''">
						</image>
						<text class="hc_txt"
							:style="item.menuTitle == '人脸采集' ? 'margin-top: 6px;' : ''">{{ item.menuTitle }}</text>
					</view>
					<view class="hcc_item1"></view>
					<view class="hcc_item1"></view>
					<view class="hcc_item1"></view>
				</view>
			</view>
			<!-- 	<view class="hc_item1">
				<text class="hc_txt1">银行服务</text>
				<view class="hc_list1">
					<view class="hcc_item1" v-for="(item,index) in blankList" @click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon">
						</image>
						<text class="hc_txt">{{ item.menuTitle }}</text>
					</view>
				</view>
			</view> -->
			<view class="hc_item1">
				<text class="hc_txt1">餐饮服务</text>
				<view class="hc_list1">
					<view class="hcc_item1 family_bottom" v-for="(item, index) in repastList" :key="index"
						@click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon"></image>
						<text class="hc_txt">{{ item.menuTitle }}</text>
					</view>
					<view class="hcc_item1">
					</view>
					<view class="hcc_item1">
					</view>
					<view class="hcc_item1">
					</view>
				</view>
			</view>
			<view class="hc_item1">
				<text class="hc_txt1">学生服务</text>
				<view class="hc_list1">
					<view class="hcc_item1" v-for="(item, index) in stuServiceList" :key="index"
						@click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon"></image>
						<text class="hc_txt">{{item.menuTitle}}</text>
					</view>
					<view class="hcc_item1"> </view>
					<view class="hcc_item1"> </view>
				</view>
			</view>
			<view class="hc_item1">
				<text class="hc_txt1">家长服务</text>
				<view class="hc_list1">
					<view class="hcc_item1 family_bottom" v-for="(item, index) in famServiceList" :key="index"
						@click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon"></image>
						<text class="hc_txt">{{ item.menuTitle }}</text>
					</view>
					<view class="hcc_item1"> </view>
					<view class="hcc_item1"> </view>
				</view>
			</view>
			<view class="hc_item1" v-if="schManageList.length > 0">
				<text class="hc_txt1">校园管理</text>
				<view class="hc_list1">
					<view class="hcc_item1 family_bottom" :class="{'tag': TodoLeaveNum > 0}" :data-num="TodoLeaveNum"
						v-for="(item, index) in schManageList" :key="index" @click="jumpRepastTo(item)">
						<image class="hc_img" :src="item.icon"></image>
						<text class="hc_txt">{{ item.menuTitle }}</text>
					</view>
					<view class="hcc_item1">
					</view>
					<view class="hcc_item1">
					</view>
					<view class="hcc_item1">
					</view>
				</view>
			</view>
			<mcModal :isShow="showMcModal" :content="content" :title="title" @cancel="bb()" :inp="false" @ok="cc()"
				:okBtn="okBtn"></mcModal>
			<tmcModal :isShow="showMcModal1" :content="content1" :title="title1" :okBtn="okBtn1" :showCancel="false"
				@ok="queren"></tmcModal>
		</view>
		<!-- #ifndef APP-PLUS -->
		<!-- <mc-tabbar :current-page="0"></mc-tabbar>  -->
		<!-- #endif -->
	</view>
</template>

<script>
	let _this;
	import {
		queryStudentCardBalance,
		queryMilkCardBalance,
		selectAppInfo,
		findUserByUserId,
		getWxJsApiSignature,
		queryNewsList2,
		queryBindStudentQuantity,
		offlineQrcodeConsumeOrder,
		offlineQrcodeConsumePay,
		getTodoLeaveList,
		updataPopup,
		lateBack
	} from "../../common/api/index.js";
	import {
		getTwoUserList,
	} from '../../common/api/blank.js';
	import {
		showLoading,
		hideLoading
	} from "../../common/js/loading.js";
	import {
		_showToast,
		dateFtt,
		_showJumpModal
	} from "../../common/js/util.js";
	import mcTabbar from "../../components/mc-tarbar.vue";
	import mcModal from "../../components/custom-modal/custom-modal.vue";
	import tmcModal from "../../components/custom-modal/mc-modal.vue";
	// #ifdef APP-PLUS
	import fileApi from "@/uni_modules/hbh-fileIo/js_sdk/index.js"
	// #endif
	// #ifdef H5
	import wx from "../../common/js/wx-js-sdk.js";
	// #endif
	export default {
		onLoad() {
			_this = this
			// #ifdef MP-WEIXIN
			wx.showShareMenu({
				withShareTicket: true,
				menus: ["shareAppMessage", "shareTimeline"]
			});
			// #endif
			// #ifdef APP-PLUS
			this._getAppInfo();
			// #endif
		},
		async onShow() {
			// #ifdef APP-PLUS
			let args = plus.runtime.arguments;
			if (!uni.getStorageSync("s_login")) {
				console.log("先去登录")
			} else {
				let s_userId = uni.getStorageSync("s_userId");
				try {
					const res = await getTwoUserList({
						userId: s_userId
					})
					if (res.code == 0) {
						if (res.data.length > 0) {

							this.is_open_e_wallet = true
						} else {
							this.is_open_e_wallet = false
						}
					} else {
						_showToast(res.msg)
					}
				} catch (err) {
					_showToast(err)
				}
			}
			// plus.runtime.setBadgeNumber(100);
			// #endif
			setTimeout(() => {
				this.loginFlag = uni.getStorageSync("s_login");
				if (this.loginFlag) {
					this._getUserInfo();
					this._queryStudentCardBalance();
					this._queryBindStudentQuantity();
				}
			}, 800)
			// #ifdef MP-WEIXIN
			let _that = this;
			uni.getSystemInfo({
				success: function(res) {
					let info = uni.createSelectorQuery().select(".h_header");
					let info2 = uni.createSelectorQuery().select(".h_notice");
					// let info3 = uni.createSelectorQuery().select(".h_notices");
					info
						.boundingClientRect(function(data) {
							info2
								.boundingClientRect(function(datas) {
									_that.height = res.windowHeight -
										data.height - datas.height -
										62 + 'px';
									// info3
									//   .boundingClientRect(function(datass) {
									//     _that.height = res.windowHeight - data.height - datas.height - datass.height - 62 + 'px';
									//   })
									//   .exec();
								})
								.exec();
						})
						.exec();
				}
			});
			// #endif
		},
		components: {
			mcTabbar,
			mcModal,
			tmcModal
		},
		data() {
			return {
				cid: "",
				loginFlag: uni.getStorageSync("s_login"),
				mobileNo: "",
				sweixin: "",
				stuObj: {},
				carList: [],
				orgId: "",
				showMcModal: false,
				title: "",
				content: "",
				pageUrl: "",
				okBtn: "",
				showMcModal1: false,
				title1: "",
				content1: "",
				okBtn1: "",
				selectCard: "",
				newList: [],
				geList: [],
				height: "",
				geListStu: [],
				allQuantity: 0,
				kithQuantity: 0,
				ownQuantity: 0,
				param: "",
				orderNo: '',
				callbackObj: {},
				TodoLeaveNum: 0,
				is_open_e_wallet: false,
				openWhoPage: 0, //0提示绑定,1打开消费选择用户，2直接打开消费记录
				topSwiper: [{
						src: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fres.cjyun.org%2Fa%2F10008%2F202102%2Fb8fdd78416ec9e0ee6f66c810a23f795.jpeg&refer=http%3A%2F%2Fres.cjyun.org&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1617954410&t=767fd0cce3e69e0e04028e47a69d273e"
					},
					{
						src: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fimgextra%2Fi2%2F2200770744171%2FO1CN016seSBf1ggMZgAu39G_%21%212200770744171.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1617954441&t=69018de9ce197440f682afbcfffb048a"
					},
					{
						src: "/static/images/home/background.png"
					}
				],
				// blankList: [],
				homeList: [{
						menuTitle: "卡包",
						icon: "/static/images/blank/blankIcon.png",
						login: true,
						bind: true,
						realName: true,
						url: '/packageCard/card/dangan?bindType=0&toRedpack=1',
						handle() {
							uni.navigateTo({
								url: "/packageCard/card/dangan?bindType=0&toRedpack=1"
							});
						}
					},
					// {
					// 	menuTitle: "绑卡",
					// 	login: true,
					// 	realName: true,
					// 	blank: false,
					// 	icon: "/static/images/home/bind_card.png",
					// 	// url: '/packageCard/card/bind?toForm=guide&only=true',
					// 	handle() {
					// 		uni.navigateTo({
					// 			url: "/packageCard/card/bind?toForm=guide&only=true?orgId=4500001"
					// 		});
					// 	}
					// },
					// {
					// 	menuTitle: "充值",
					// 	blank: false,
					// 	icon: "/static/images/home/rechange.png",
					// 	// url: '/packageCard/card/carList',
					// 	handle() {
					// 		_this._toRechange()
					// 	}

					// },
					// {
					// 	menuTitle: "缴费",
					// 	login: true,
					// 	allBind: true,
					// 	realName: true,
					// 	blank: false,
					// 	icon: "/static/images/home/jiaofei.png",
					// 	handle() {
					// 		uni.navigateTo({
					// 			url: "/pagePayment/payment/tuition?certUserInfo=" +
					// 				JSON.stringify(_this.stuObj)
					// 		});
					// 	}
					// },
					// {
					// 	menuTitle: "收支明细",
					// 	login: true,
					// 	allBind: true,
					// 	realName: true,
					// 	blank: false,
					// 	icon: "/static/images/home/shou_detail.png",
					// 	url: '/pagePayment/recode/sz_list'
					// },
					{
						menuTitle: "补助查询",
						login: true,
						allBind: true,
						realName: true,
						blank: false,
						icon: "/static/images/home/bu_query.png",
						url: '/pagePayment/recode/bz_list'
					},
					{
						menuTitle: "消费记录",
						login: true,
						allBind: true,
						realName: true,
						icon: "/static/images/home/xiaofeimx.png",
						url: '/pagePayment/recode/xf_list',
						handle() {
							_this._getXiaofei("消费记录")
						}
					},
					{
						menuTitle: "人脸采集",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/face.png",
						url: '../me/fixPortrait',
						handle() {
							_this._toCaiji("人脸采集")
						}
					},
					// // #ifdef MP-WEIXIN
					// {
					// 	menuTitle: "牛奶卡",
					// 	login: true,
					// 	bind: false,
					// 	realName: true,
					// 	blank: false,
					// 	icon: "/static/images/home/bind_card.png",
					// 	handle() {
					// 		_this._toMilk()
					// 	}
					// }
					// // #endif
				],
				repastList: [{
						menuTitle: '预约',
						icon: '/static/images/home/booked.png',
						login: true,
						bind: true,
						realName: true,
						url: '/pages/meal/booked'
					},
					{
						menuTitle: '报餐',
						icon: '/static/images/home/meal.png',
						login: true,
						bind: true,
						realName: true,
						url: '/pages/meal/meal'
					},
				],
				stuServiceList: [{
						menuTitle: "请假申请",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/stu_apply.png",
						url: "../student/qingjia",
						parame: 'path=xiaoda&applyType=3'

					},
					// #ifndef APP 
					{
						menuTitle: "外出申请",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/stu_apply.png",
						url: "../student/qingjia",
						parame: 'path=xiaoda&applyType=1'
					}, {
						menuTitle: "实习申请",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/stu_apply.png",
						url: "../student/qingjia",
						parame: 'path=xiaoda&applyType=2'
					},
					// #endif
					// #ifdef MP-WEIXIN
					// {
					// 	menuTitle: "牛奶卡",
					// 	login: true,
					// 	bind: false,
					// 	realName: true,
					// 	icon: "/static/images/home/bind_card.png",
					// 	handle() {
					// 		_this._toMilk()
					// 	}
					// },
					{
						menuTitle: "宿舍",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/kecheng.png",
						url: '../../hotWater/index/index'
					},
					{
						menuTitle: "云打印",
						login: true,
						bind: true,
						realName: true,
						icon: "/static/images/home/print.png",
						url: "../student/cloudprint/cloudFile"
					}
					// #endif
				],
				schManageList: [
					// #ifndef APP 
					{
						menuTitle: '行程审批',
						icon: '/static/images/home/stu_apply.png',
						login: true,
						bind: true,
						realName: true,
						url: '/pageSchoolManage/approve/approveList',
						parame: 'path=xiaoda&applyType=4'
					}, {
						menuTitle: '宿舍数据',
						icon: '/static/images/home/stu_apply.png',
						login: true,
						bind: true,
						realName: true,
						url: '/pageSchoolManage/dataVisualization/index',
						parame: 'path=xiaoda&applyType=5'
					},
					// #endif
					{
						menuTitle: '晚归记录',
						icon: '/static/images/home/stu_apply.png',
						login: true,
						bind: false,
						realName: false,
						url: '/pageSchoolManage/dataVisualization/backLate',
						parame: 'path=xiaoda&applyType=92'
					}, {
						menuTitle: '夜不归宿',
						icon: '/static/images/home/stu_apply.png',
						login: true,
						bind: false,
						realName: false,
						url: '/pageSchoolManage/dataVisualization/noBack',
						parame: 'path=xiaoda&applyType=93'
					}

				],
				famServiceList: [
					// {
					// 	menuTitle: "绑定学生",
					// 	icon: "/static/images/home/bind_stu.png",
					// 	login: true,
					// 	bind: false,
					// 	realName: true,
					// 	blank: false,
					// 	url: '../student/bind'
					// },
					{
						menuTitle: "学生轨迹",
						icon: "/static/images/home/stu_guiji.png",
						login: true,
						bind: true,
						realName: true,
						bindKith: true,
						url: "../student/selStu?name=学生轨迹&bindType=1",
					},
					{
						menuTitle: "学生信息",
						icon: "/static/images/home/stu_info.png",
						login: true,
						bind: true,
						realName: true,
						bindKith: true,
						url: "../student/info"
					}
				],
				QRList: [{
						menuTitle: "电子钱包",
						icon: "/static/images/home/cardBox.png",
						login: true,
						bind: false,
						realName: true,
						blank: true,
						handle() {
							uni.navigateTo({
								url: "/pageBlank/index/index"
							})
						}
					},
					{
						menuTitle: "二维码",
						icon: "/static/images/home/qrcodeBox.png",
						login: true,
						bind: true,
						realName: true,
						undone: false,
						url: '/pagePayment/qrcode/qrcode'
					},
					{
						menuTitle: "扫码",
						icon: "/static/images/home/saoBox.png",
						login: true,
						bind: true,
						undone: false,
						realName: true,
						handle() {
							// #ifdef H5
							_this._hSao();
							// #endif
							// #ifndef H5
							_this.jumpSao();
							// #endif
						}
					},
					{
						menuTitle: "挂失",
						icon: "/static/images/home/guaBox.png",
						login: true,
						bind: true,
						realName: true,
						url: '/packageCard/card/guashi'
					}
				],
				// #ifdef APP-PLUS
				appUrl: "",
				wgtAppUrl: ""
				// #endif
			};
		},
		methods: {
			mGetDate(year, mouth) {
				var date = new Date();
				var year = year ? year : date.getFullYear();
				var month = mouth ? mouth : date.getMonth() + 1;
				var d = new Date(year, month, 0);
				return d.getDate();
			},
			dateFtt(fmt, date) {
				date = new Date(date)
				var o = {
					"M+": date.getMonth() + 1, //月份 
					"d+": date.getDate(), //日 
					"h+": date.getHours(), //小时 
					"m+": date.getMinutes(), //分 
					"s+": date.getSeconds(), //秒 
					"q+": Math.floor((date.getMonth() + 3) / 3), //季度 
					"S": date.getMilliseconds() //毫秒 
				};
				if (/(y+)/.test(fmt))
					fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
				for (var k in o)
					if (new RegExp("(" + k + ")").test(fmt))
						fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr((
								"" + o[k])
							.length)));
				return fmt;
			},
			_lateBack(orgId) {
				let lateArr = []
				let noBackArr = []
				Promise.all([lateBack({
					orgId,
					userId: uni.getStorageSync("s_userId"),
					sysCheckState: 1,
					startTime: this.dateFtt("yyyy-MM", new Date()) + "-01 00:00:00",
					endTime: this.dateFtt("yyyy-MM", new Date()) + "-" + this.mGetDate(
						new Date()
						.getFullYear(),
						new Date().getMonth() + 1) + " 23:59:59",
					pageNo: 1,
					pageSize: 1000
				}), lateBack({
					orgId,
					userId: uni.getStorageSync("s_userId"),
					sysCheckState: 0,
					startTime: this.dateFtt("yyyy-MM", new Date()) + "-01 00:00:00",
					endTime: this.dateFtt("yyyy-MM", new Date()) + "-" + this.mGetDate(
						new Date()
						.getFullYear(),
						new Date().getMonth() + 1) + " 23:59:59",
					pageNo: 1,
					pageSize: 1000
				})]).then((res) => {
					if (res[0].list && res[1].list) {
						console.log(res)
						lateArr = res[0].list.filter(item => {
							return !item.isLook
						})
						noBackArr = res[1].list.filter(item => {
							return !item.isLook
						})
						let idsArr = []
						let a = ""
						lateArr.forEach((item, index) => {
							a += item.empName + "(" + item.bizTime + ") "
							idsArr.push(item.id)
						})
						if (!a) {
							a = '无'
						}
						let b = ""
						noBackArr.forEach((item, index) => {
							b += item.empName + "(" + item.bizTime + ") "
							idsArr.push(item.id)
						})
						if (!b) {
							b = '无'
						}
						if (idsArr.length > 0) {
							uni.showModal({
								showCancel: false,
								title: "温馨提示！",
								content: `晚归人员：${a}\r\n未归人员：${b}`,
								success: (res) => {
									if (res.confirm) {
										console.log('用户点击确定');
										this._updataPopup(idsArr.join(","))
									} else if (res.cancel) {
										console.log('用户点击取消');
									}
								}
							})
						}
					}

				}).catch((err) => {
					console.log(err)
				})
			},
			_updataPopup(ids) {
				updataPopup({
					ids
				}).then((res) => {
					console.log(res)
				}).catch((err) => {
					console.log(err)
				})
			},
			_getAppInfo() {
				selectAppInfo("xiaojiao_app_info")
					.then(res => {
						// console.log(res)
						if (res.resultCode == 0) {
							let _that = this;
							plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
								let self_Version = widgetInfo.version.split(".") //本地信息
								let orgin_Version = res.versionName.split(".") //服务器的版本
								if (Number((orgin_Version[0] + "" + orgin_Version[1])) >
									Number((self_Version[0] + "" +
										self_Version[1]))) { //
									console.log("大版本更新")
									_that.title1 = "更新提示";
									_that.content1 = "发现最新版本，请速速更新！";
									_that.okBtn1 = "立即更新";
									_that.showMcModal1 = true;
									// #ifdef APP-PLUS
									_that.appUrl = res.appUrl;
									_that.wgtAppUrl = res.wgtAppUrl.split("&")[0];
									// #endif
									uni.hideTabBar({
										animation: true
									}) //隐藏原生tabbar
								} else if (Number((orgin_Version[0] + "" + orgin_Version[
										1])) == Number((self_Version[0] +
										"" + self_Version[1]))) { //小更新
									if (Number(orgin_Version[2]) > Number(self_Version[
											2])) { //升级小版本
										console.log("有新版本")
										// _that.title = "更新提示";
										// _that.content = "发现最新版本，请速速更新！";
										// _that.okBtn = "立即更新";
										// _that.showMcModal = true;
										// #ifdef APP-PLUS
										_that.appUrl = res.appUrl;
										_that.wgtAppUrl = res.wgtAppUrl.split("&")[0];
										_that.downWgt(_that.wgtAppUrl);
										// #endif
									} else {
										console.log("已经是最新版本")
										uni.showTabBar({
											animation: true
										})
										return
									}
								} else { //最新的
									console.log("wgt更新提示:服务器版本比本机版本低---最新滴")
									uni.showTabBar({
										animation: true
									})
									return
								}
								console.log(orgin_Version[0], orgin_Version[1],
									orgin_Version[2])
							});
						}
					})
					.catch(err => {
						console.log(err);
					});
			},
			downWgt(wgtUrl) {
				let _that = this;
				const APPID = "__UNI__2611ED9";
				plus.nativeUI.showWaiting("下载更新文件...");
				plus.downloader
					.createDownload(
						wgtUrl, {
							filename: "_doc/update/${APPID}.wgt"
						},
						function(d, status) {
							if (status == 200) {
								console.log("下载更新文件成功：" + d.filename);
								_that.installWgt(d.filename);
							} else {
								plus.nativeUI.alert("下载更新文件失败！");
							}
							plus.nativeUI.closeWaiting();
						}
					)
					.start();
			},
			installWgt(path) {
				plus.nativeUI.showWaiting("安装更新文件...");
				plus.runtime.install(
					path, {},
					function() {
						plus.nativeUI.closeWaiting();
						console.log("安装更新文件成功！");
						// uni.showToast({
						//   title: "更新成功"
						// });
						plus.runtime.restart();
					},
					function(e) {
						plus.nativeUI.closeWaiting();
						plus.nativeUI.alert("安装更新文件失败[" + e.code + "]：" + e.message);
					}
				);
			},
			bb() {
				this.showMcModal = false;
				uni.showTabBar({
					animation: true
				})
			},
			cc() {
				this.showMcModal = false;
				uni.showTabBar({
					animation: true
				})
				if (this.okBtn == "立即更新") {
					this.downWgt(this.wgtAppUrl);
				} else if (this.okBtn == "立即下载") {
					let url = "/stu_side_h5/xj/download.html";
					uni.navigateTo({
						url: "../login/userAgreement?url=" + url
					});
					// switch (uni.getSystemInfoSync().platform) {
					//   case 'android':
					// plus.runtime.openURL(this.appUrl);
					// 	break;
					//   case 'ios':
					// plus.runtime.launchApplication({
					//   action: 'https://apps.apple.com/cn/app/%E6%99%BA%E5%88%9D%E5%B0%8F%E8%BE%BE/id1537510834'
					// }, function (e) {
					//   console.log('Open system default browser failed: ' + e.message);
					// });
					// 	break;
					//   default:
					// 	console.log('运行在开发者工具上')
					// 	break;
					// }
				} else if (this.okBtn == "确认付款") {
					showLoading('付款中...')
					offlineQrcodeConsumePay({
						orderNo: this.orderNo,
						loginOrgId: this.geListStu[0].students[0].orgId,
						empId: this.geListStu[0].students[0].empId,
						userId: uni.getStorageSync("s_userId")
					}).then(result => {
						this.showMcModal1 = false;
						if (result.resultCode == 0) {
							hideLoading()
							this.callbackObj = result;
							this.title1 = "温馨提示";
							this.content1 = '支付成功';
							this.okBtn1 = "确认";
							this.showMcModal1 = true;
						} else {
							hideLoading()
							this.title1 = "温馨提示";
							this.content1 = result.resultMsg || '支付失败';
							this.okBtn1 = "确认";
							this.showMcModal1 = true;
						}
					}).catch(err => {
						hideLoading()
						console.log(err)
					})
				} else {
					if (this.pageUrl != null) {
						uni.navigateTo({
							url: this.pageUrl
						});
					} else {
						this._QRCode();
					}
				}
			},
			queren() {
				this.showMcModal1 = false;
				uni.showTabBar({
					animation: true
				})
				if (this.okBtn1 == "立即更新") {
					if (plus.os.name == "Android") {
						console.log(this.appUrl)
						fileApi.createMuchDirectory(['downloadApk']).then((res) => {
							if (res.code == 200) {
								console.log("这里")
								plus.io.resolveLocalFileSystemURL(
									fileApi.golabelUrl + 'downloadApk',
									(
										entry) => {
										console.log(entry)
										//读取这个目录对象
										var directoryReader = entry
											.createReader();
										console.log(directoryReader)
										//读取这个目录下的所有文件
										directoryReader.readEntries((
											entries) => {
											//如果有才操作
											if (entries
												.length > 0
											) {
												//不删除目录，只删除文件
												entries
													.forEach(
														(item,
															index
														) => {
															item.remove()
															// console.log(entries[index].name)
														}
													)
												//清除之前的apk，再下载
												this.downLoad(
													this
													.appUrl
												)
											} else {
												this.downLoad(
													this
													.appUrl
												)
											}
										})
									})
							} else {
								uni.showToast({
									icon: "none",
									title: "出现异常!"
								})
							}
						}).catch((err) => {
							console.log(err)
						})
					} else {
						plus.runtime.launchApplication({
								action: "https://apps.apple.com/cn/app/%E6%99%BA%E5%88%9D%E5%B0%8F%E4%BA%A4/id1636645472"
							},
							function(e) {
								console.log("Open system default browser failed: " + e.message);
							}
						);
					}
				}
				if (this.content1 == "支付成功") {
					uni.navigateTo({
						url: '/pagePayment/qrcode/consumeQrcode?orderNo=' + this.callbackObj
							.orderNo + '&empId=' +
							this.geListStu[0].students[0].empId + '&orgId=' + this.geListStu[0]
							.students[0].orgId
					})
				}
			},
			downLoad(src) {
				//后端下载文件接口
				// 参数(文件名称)

				// let name = 'myapp.apk'
				uni.showLoading({
					mask: true,
					title: "下载apk文件中..."
				})
				let datas = {

					//自定义下载文件路径，保存文件路径仅支持以"_downloads/"、"_doc/"、"_documents/"开头的字符串

					filename: fileApi.golabelUrl +
						'downloadApk/xiaojiao.apk',

					//默认为GET请求。注意这里需大写“GET”、“POST”

					method: 'GET',
					timeout: 0,
					retry: 3,
					retryInterval: 5
				}

				let dtask = plus.downloader.createDownload(

					src,
					datas,

					(d, status) => {

						// 已响应结果
						console.log(d, status)
						if (status == 200) {
							let apkSrc =

								plus.io.convertLocalFileSystemURL(

									d.filename

								)
							console.log(apkSrc)
							uni.hideLoading()
							plus.runtime.install(apkSrc)


						} else {
							//重连三次都不行就弹出提示，服务器挂了或者自己没网络了
							console.log("下载失败")
							dtask.clear() //清除下载任务
							uni.hideLoading()
						}

					}

				)
				dtask.addEventListener('statechanged', (task) => {

					if (!dtask) {
						return;
					}
					switch (task.state) {
						case undefined:
							console.log('下载任务未开始');
							break;

						case 0:
							console.log('下载任务开始调度');
							break;
						case 1:
							console.log('下载任务开始请求');
							break;
						case 2:
							console.log('下载任务网络连接已建立，服务器返回响应，准备传输数据内容');
							//这里可以弹出下载进度框了
							break;
						case 3:
							// console.log(task.downloadedSize, task.totalSize)
							//下载进度:
							// this.process = parseInt(Number((task.downloadedSize / task
							// 	.totalSize) * 100))
							// console.log("下载进度："+ parseInt(Number((task.downloadedSize / task
							// .totalSize) * 100)))
							break;
						case 4:
							break;
						case 5:
							cnosole.log('下载任务已暂停');

							break;

					}

				});

				// 开始下载

				dtask.start()
			},
			_queryBindStudentQuantity() {
				let s_userId = uni.getStorageSync("s_userId");
				queryBindStudentQuantity({
						userId: s_userId
					})
					.then(res => {
						if (res.code == 0) {
							this.allQuantity = res.data.allQuantity;
							this.kithQuantity = res.data.kithQuantity;
							this.ownQuantity = res.data.ownQuantity;
							this._queryAppNewsList();
						} else {
							this.allQuantity = 0;
							this.kithQuantity = 0;
							this.ownQuantity = 0;
						}
					})
					.catch(err => {
						console.log(err);
					});
			},
			_queryAppNewsList() {
				let data = [],
					stulist = [];
				this.geListStu.forEach(item => {
					stulist.push(item.students[0]);
				});
				stulist.forEach(stu => {
					data.push({
						currentPage: 1,
						pageSize: 50,
						orgId: stu.orgId,
						// empId: stu.empId,
						msgType: 0 //this.ownQuantity == 0 ? 0 : 1
					});
				});
				queryNewsList2(JSON.stringify(data))
					.then(res => {
						if (res.code == 0) {
							if (res.data != null) {
								this.newList = res.data.filter(item => {
									return item.msgRead == 0;
								});
							}
						}
					})
					.catch(err => {
						console.log(err);
					});
			},
			_toTips() {
				_showToast("敬请期待~");
			},
			_toRechange() {
				let path = this.allQuantity > 0 ? "/packageCard/card/carList" : "/pagePayment/recharge/recharge"
				uni.navigateTo({
					url: path
				})
			},
			_toMilk() {
				// 奶机构
				uni.showLoading({
					title: '加载中...'
				})
				let s_userId = uni.getStorageSync("s_userId");
				queryMilkCardBalance({
					userId: uni.getStorageSync("s_userId"),
					queryCard: true,
					queryWallet: true,
					bindType: '3'
				}).then(res => {
					if (res.code == 0) {
						uni.hideLoading()
						let isBindMilk = res.data.orgs.filter(item => item.bindType == 3).length > 0,
							path = ''

						if (isBindMilk) path = '../../pageMilk/index/index'
						else path = '../../pageMilk/bind/bind'
						uni.navigateTo({
							url: path
						})
					} else if (res.code == 1) {
						uni.navigateTo({
							url: '../../pageMilk/bind/bind'
						})
					} else {
						uni.hideLoading()
					}
				}).catch(err => {
					_showToast('奶机构卡信息加载错误：' + res.msg || res.resultMsg)
					uni.hideLoading()
					console.log(err);
				});
			},
			_getXiaofei(name) {
				if (this.openWhoPage > 0) {
					if (this.openWhoPage == 1) {
						uni.navigateTo({
							url: `../student/selStu?name=${name}&bindType=0`
						});
						return
					}
					uni.navigateTo({
						url: `/pagePayment/recode/xf_list?orgId=${this.geListStu[0].students[0].orgId}&empId=${this.geListStu[0].students[0].empId}`
					});
				} else {
					this._toGeCard(
						"请先绑卡",
						"/packageCard/card/bind?toForm=guide&only=true"
					);
				}
			},
			_toCaiji(name) {
				// console.log(name)
				let phoneName = ''
				switch (uni.getSystemInfoSync().platform) {
					case 'android':
						phoneName = '应用市场'
						break;
					case 'ios':
						phoneName = 'App Store'
						break;
					default:
						phoneName = '应用市场'
						console.log('运行在开发者工具上')
						break;
				}
				// #ifndef APP-PLUS
				this.title = '温馨提示'
				this.content = `下载智初小交APP完善人脸信息，即可使用刷脸支付`
				this.okBtn = '确认'
				this.showMcModal = true
				// #endif
				// #ifdef APP-PLUS
				if (this.ownQuantity == 1) {
					uni.navigateTo({
						url: "../me/fixPortrait?orgId=" +
							this.geListStu[0].students[0].orgId +
							"&empId=" +
							this.geListStu[0].students[0].empId +
							"&empName=" +
							this.geListStu[0].students[0].empName
					});
				} else if (this.ownQuantity >= 2) {
					uni.navigateTo({
						url: `../student/selStu?name=${name}&bindType=0`
					});
				} else {
					this._toGeCard(
						"请先绑卡",
						"/packageCard/card/bind?toForm=guide&only=true"
					);
				}
				// #endif
			},
			toLogin() {
				this.title = "未登录";
				this.content = "您未登录，需要登录后才能继续";
				this.pageUrl = "../login/login";
				this.okBtn = "立即登录";
				this.showMcModal = true;
			},
			_toGeCard(content, url) {
				this.title = "温馨提示";
				this.content = content;
				this.pageUrl = url;
				this.okBtn = "去绑卡";
				this.showMcModal = true;
				uni.hideTabBar({
					animation: true
				})
			},
			_toRenZheng() {
				this.title = "温馨提示";
				this.content = "使用该功能前，请先完成实名认证！";
				this.pageUrl = "../me/renzheng";
				this.okBtn = "去认证";
				this.showMcModal = true;
			},
			_hSao() {
				let that = this;
				//#ifdef H5
				let url = window.location.href.split("#")[0];
				//#endif
				let appId = uni.getStorageSync("str3");
				getWxJsApiSignature({
						url: url,
						appId: appId
					}).then(res => {
						if (res.resultCode == 0) {
							wx.config({
								debug: false,
								appId: res.appId,
								timestamp: res.timeStamp,
								nonceStr: res.nonceStr,
								signature: res.signature,
								jsApiList: ["scanQRCode"]
							});
							wx.ready(function() {
								wx.checkJsApi({
									jsApiList: ["scanQRCode"],
									success: function(res) {
										if (res.checkResult
											.scanQRCode === true) {
											wx.scanQRCode({
												desc: "scanQRCode desc",
												needResult: 1,
												scanType: ["qrCode",
													"barCode"
												],
												success: function(
													res
												) {
													setTimeout
														(() => {
															const getCode =
																res
																.resultStr // 当needResult 为 1 时，扫码返回的结果
															if (res
																.resultStr
																.substr(
																	0,
																	2
																) ==
																"98"
															) {
																showLoading
																	(
																		'下单中...'
																	)
																offlineQrcodeConsumeOrder
																	({
																		qrcode: res
																			.resultStr,
																		loginOrgId: that
																			.geListStu[
																				0
																			]
																			.students[
																				0
																			]
																			.orgId,
																		empId: that
																			.geListStu[
																				0
																			]
																			.students[
																				0
																			]
																			.empId,
																		userId: uni
																			.getStorageSync(
																				"s_userId"
																			)
																	})
																	.then(
																		result => {
																			console
																				.log(
																					result
																				)
																			that.showMcModal1 =
																				false;
																			if (result
																				.resultCode ==
																				0
																			) {
																				hideLoading
																					()
																				that.orderNo =
																					result
																					.orderNo;
																				that.title =
																					"消费提醒";
																				that.content =
																					`本次付款金额为：${result.amount}元！`;
																				that.pageUrl =
																					null;
																				that.okBtn =
																					"确认付款";
																				that.showMcModal =
																					true;
																			} else {
																				hideLoading
																					()
																				that.title1 =
																					"温馨提示";
																				that.content1 =
																					result
																					.resultMsg;
																				that.okBtn1 =
																					"确认";
																				that.showMcModal1 =
																					true;
																			}
																		}
																	)
																	.catch(
																		err => {
																			hideLoading
																				()
																			console
																				.log(
																					err
																				)
																		}
																	)
															}
															// uni.showModal({
															// 	title: '测试',
															// 	content: `${res.resultStr}`
															// })
														})
													// if (res.confirm) {
													// 	//跳转到小程序
													// 	if (res.miniprogram) {
													// 	     wx.miniProgram.switchTab({url: '/pages/home/home'});
													// 	}
													// } else if (res.cancel) {
													//     console.log('用户点击取消');
													// }
												},
												error: function(
													err
												) {
													uni.showToast({
														title: `${JSON.stringify(res)}`
													});
												}
											});
										} else {
											uni.showToast({
												title: `${JSON.stringify(res)}`
											});
										}
									},
									fail: function(res) {
										uni.showToast({
											title: `${JSON.stringify(res)}`
										});
									}
								});
							});
							wx.error(function(res) {
								uni.showToast({
									title: `${JSON.stringify(res)}`
								});
							});
						} else {
							this.title1 = "温馨提示";
							this.content1 = res.resultMsg;
							this.showMcModal1 = true;
							this.okBtn1 = "确认";
						}
					})
					.catch(err => {
						console.log(err);
					});
			},
			_queryStudentCardBalance() {
				uni.showLoading({
					title: "加载中...",
					mask: true
				})
				let s_userId = uni.getStorageSync("s_userId");
				// 小交自营
				queryStudentCardBalance({
					userId: s_userId,
					// queryCard: true,
					// queryWallet: true,
					// bindType: '0'
				}).then(res => {
					// console.log(res)

					if (res.data && res.data.orgs.length > 0) {
						if (res.data.orgs.length == 1 && res.data.students.length == 1) {
							this.openWhoPage = 2
						} else {
							this.openWhoPage = 1
						}
					} else {
						this.openWhoPage = 0
					}
					if (res.code == 0) {
						uni.hideLoading()
						this.geListStu = res.data.students;
						this._getTodoLeaveList()
						if (this.geListStu[0].students[0].orgId == 4501287) { //南宁四中才弹框
							this._lateBack(this.geListStu[0].students[0].orgId)
						}
					} else {
						uni.hideLoading()
						// _showToast(res.msg)
						this.geListStu = [];
					}
				}).catch(err => {
					uni.hideLoading()
					console.log(err);
				});
			},
			_getUserInfo() {
				showLoading();
				let s_userId = uni.getStorageSync("s_userId");
				plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
					console.log(widgetInfo)
					findUserByUserId({
							userId: s_userId,
							version: widgetInfo.version
						})
						.then(res => {
							if (res.resultCode == 0) {
								this.mobileNo = res.obj.mobileNo;
								this.stuObj = res.obj;
								uni.setStorageSync("realname", res.obj.userName);
								uni.setStorageSync("idCard", res.obj.idCard);
								uni.setStorageSync("s_mobile", res.obj.mobileNo);
								hideLoading();
							} else {
								hideLoading();
							}
						})
						.catch(err => {
							hideLoading();
							console.log(err);
						});
				})
			},
			jumpLogin() {
				if (this.loginFlag) {} else {
					uni.navigateTo({
						url: "../login/login"
					});
				}
			},
			jumpSao() {
				let _this = this;
				uni.scanCode({
					success: function(res) {
						console.log("条码类型：" + res.scanType);
						console.log("条码内容：" + res.result);
						if (res.result.indexOf("?") > -1) {
							_this.param = res.result.split("?")[1];
							_this.title = "温馨提示";
							_this.content = "该二维码是申能达智慧热水小程序";
							_this.pageUrl = null;
							_this.okBtn = "前往使用";
							_this.showMcModal = true;
						} else if (res.result.substr(0, 2) == "98") { // 脱机消费
							showLoading('下单中...')
							offlineQrcodeConsumeOrder({
								qrcode: res.result,
								loginOrgId: _this.geListStu[0].students[0]
									.orgId,
								empId: _this.geListStu[0].students[0].empId,
								userId: uni.getStorageSync("s_userId")
							}).then(result => {
								_this.showMcModal1 = false;
								if (result.resultCode == 0) {
									hideLoading()
									_this.orderNo = result.orderNo;
									_this.title = "消费提醒";
									_this.content =
										`本次付款金额为：${result.amount}元！`;
									_this.pageUrl = null;
									_this.okBtn = "确认付款";
									_this.showMcModal = true;
								} else {
									hideLoading()
									_this.title1 = "温馨提示";
									_this.content1 = result.resultMsg;
									_this.okBtn1 = "确认";
									_this.showMcModal1 = true;
								}
							}).catch(err => {
								hideLoading()
								console.log(err)
							})
						} else {
							_this.title1 = "温馨提示";
							_this.content1 = "目前本项目只支持扫一扫跳转特定小程序";
							_this.okBtn1 = "确认";
							_this.showMcModal1 = true;
						}
					}
				});
			},
			_QRCode() {
				let _this = this;
				// #ifdef MP-WEIXIN
				uni.navigateToMiniProgram({
					appId: "wx1efb69bc00140bc7",
					path: "",
					success: function(res) {
						console.log(res);
					},
					fail: function(err) {
						console.log(err);
					},
					complete: function(e) {
						console.log(e);
					}
				});
				// #endif
				// #ifdef MP-ALIPAY
				uni.navigateToMiniProgram({
					appId: "2021001157673614",
					path: "",
					success: function(res) {
						console.log(res);
					},
					fail: function(err) {
						console.log(err);
					},
					complete: function(e) {
						console.log(e);
					}
				});
				// #endif
				// #ifdef APP-PLUS
				plus.share.getServices(
					function(res) {
						var sweixin = null;
						for (var i = 0; i < res.length; i++) {
							var t = res[i];
							if (t.id == "weixin") {
								sweixin = t;
							}
						}
						if (sweixin) {
							sweixin.launchMiniProgram({
								id: "gh_5b5232bc2726",
								type: 0, //0 正式 1 测试 2 体验  小程序的版本
								path: `pages/index/index?${_this.param}` //这里你要跳的路径，可以传值
							});
						}
					},
					function(res) {
						console.log(JSON.stringify(res));
					}
				);
				// #endif
			},
			jumpRepastTo(item) {
				console.log(item, "----", this.ownQuantity)
				if (item.login && !this.loginFlag) {
					this.toLogin()
					return
				}
				// if (item.realName && this.stuObj.isCert != 0) {
				// 	this._toRenZheng()
				// 	return
				// }
				if (item.undone) {
					uni.showToast({
						icon: "none",
						title: "功能未开通"
					})
					return
				}
				if (item.blank) {
					item.handle()
					return
				}
				if (item.bind && (this.ownQuantity == 0)) {
					this._toGeCard(
						"请先绑卡",
						"/packageCard/card/bind?toForm=guide&only=true"
					);
					return
				}
				if (item.handle) {
					item.handle()
					return
				}
				if (this.geListStu.length > 0) {
					uni.setStorageSync("k_orgId", this.geListStu[0].students[0].orgId)

					uni.navigateTo({
						url: item.url + (this.geListStu.length > 0 ?
							`?orgId=${this.geListStu[0].students[0].orgId}&empId=${this.geListStu[0].students[0].empId}` :
							'') + (item.parame ? `&${item.parame}` : '')

					})
				} else {
					uni.navigateTo({
						url: item.url
					})
				}
			},
			_getTodoLeaveList() {
				getTodoLeaveList({
					orgId: this.geListStu[0].students[0].orgId,
					empId: this.geListStu[0].students[0].empId,
					startTime: '1990-01-01 00:00:00',
					endTime: dateFtt('yyyy-MM-dd hh:mm:ss', new Date()),
				}).then(res => {
					if (res.resultCode == 0 && res.leaveList != null) {
						this.TodoLeaveNum = res.leaveList.length
					}
				}).catch(err => {
					console.log(err)
				})
			}
		}
	};
</script>

<style lang="scss">
	page {
		background: #f6f6f6;
	}

	.home {
		background-color: #f6f6f6;
		overflow: hidden;
		height: 100vh;

		.h_header {
			width: 100vw;
			height: 390rpx;
			background-image: url("");
			background-size: 100%;
			background-repeat: no-repeat;
			position: relative;
			display: flex;
			flex-direction: row;
			align-items: center;
			padding-left: 30rpx;

			.hh_cicle {
				width: 162rpx;
				height: 192rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				margin-right: 30rpx;

				.hc_imgs {
					width: 100%;
					height: 100%;
				}
			}

			.login_box {
				display: flex;
				flex-direction: column;

				.hc_login {
					color: #ffffff;
					font-weight: 600;
					font-size: 28rpx;
				}

				.l_box_txt1 {
					color: #fff;
					font-size: 38rpx;
					margin-bottom: 20rpx;
					font-weight: 600;
				}

				.l_b_box {
					width: 500rpx;
					display: flex;
					flex: 1;
					flex-direction: row;
					justify-content: space-between;
					align-items: center;

					.l_b_login {
						height: 72rpx;
						background: linear-gradient(180deg, #ffffff 0%, #c2e1ff 100%);
						box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.19);
						border-radius: 40rpx;
						font-size: 32rpx;
						font-family: "PingFangSC-Medium, PingFang SC";
						font-weight: 500;
						color: #002a92;
						line-height: 72rpx;
						padding: 0 38rpx;
					}
				}

				.l_login_txt {
					margin-top: 20rpx;
					font-size: 32rpx;
					color: #fff;
					font-weight: 500;
					font-family: "PingFangSC-Medium, PingFang SC";
				}
			}
		}

		.h_car {
			width: 93%;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			position: absolute;
			top: 300rpx;
			left: 3.5%;

			.hcc_item {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				box-shadow: 0px 8rpx 16rpx 0px rgba(7, 7, 7, 0.14);
				border-radius: 6rpx;
				overflow: hidden;
				position: relative;

				.home_hc_img {
					width: 160rpx;
					height: 160rpx;
					position: relative;
				}

				.hc_txt {
					color: rgb(51, 51, 51);
				}

				.h_h_title {
					position: absolute;
					top: 20rpx;
					left: 20rpx;
					font-size: $font-size-lg;
					color: #ffffff;
				}
			}
		}

		.h_notice {
			margin-top: 100rpx;
			display: flex;
			justify-content: center;
			padding: 0 30rpx;
			margin-bottom: 20rpx;

			.h_n_box {
				width: 100%;
				display: flex;
				flex-direction: row;
				align-items: center;
				background-color: #ffffff;
				padding: 20rpx;
				border-radius: 8rpx;

				.n_img {
					width: 45rpx;
					height: 45rpx;
					margin-right: 10rpx;
				}

				.txt_box {
					flex: 1;

					.s_txt {
						font-size: $font-size-base;
						padding-left: 10rpx;
						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
					}
				}
			}
		}

		.h_content {
			display: flex;
			flex-direction: column;
			flex: 1;
			padding: 0 30rpx;
			height: calc(100vh - 295px);
			margin-bottom: 15rpx;
			overflow: scroll;

			.hc_item1 {
				width: 100%;
				background-color: #ffffff;
				padding: 32rpx;
				border-radius: 8rpx;
				margin-bottom: 20rpx;
				box-sizing: border-box;

				.hc_txt1 {
					color: rgb(51, 51, 51);
					font-weight: 800;
					font-size: 32rpx;
				}

				.hc_list1 {
					display: flex;
					flex-direction: row;
					flex-wrap: wrap;
					justify-content: space-between;
					margin-top: 48rpx;

					.hcc_item1 {
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						width: 20%;
						margin-bottom: 20rpx;

						&.tag {
							position: relative;

							&::after {
								content: attr(data-num);
								display: block;
								position: absolute;
								right: 8rpx;
								top: 0;
								height: 32rpx;
								line-height: 32rpx;
								padding: 0 10rpx;
								border-radius: 18rpx;
								font-size: 22rpx;
								background-color: #E43D33;
								color: #FFF;
							}
						}

						.hc_img {
							width: 78rpx;
							height: 78rpx;
							margin-bottom: 8rpx;
						}

						.hc_txt {
							color: rgb(51, 51, 51);
							font-size: $font-size-base;
						}
					}
				}
			}
		}
	}

	.h_notices {
		margin-top: 20rpx;
		display: flex;
		justify-content: center;
		padding: 0 30rpx;
		margin-bottom: 20rpx;
	}

	.swiper-item {
		width: 100%;
		height: 100%;
	}

	.swiper-item image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.user_agreement {
		text-align: left;
		text-indent: 60rpx;

		.agreement {
			font-family: "PingFang-SC-Medium, PingFang-SC";
			font-weight: 500;
			color: #185AFF;
			text-decoration: blink
		}
	}
</style>